<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: mayn
  Date: 2019/6/4
  Time: 11:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>字典列表</title>
    <style type="text/css">
        h2 {
            text-align: center;
        }

        table {
            border: 1px solid black;
            width: 80%;
            margin: 0 auto;
            text-align: center;
        }

        table td {
            border: 1px solid black;
        }

        table th {
            border: 1px solid black;
        }
    </style>

</head>


<body>
<%--

<%
    ArrayList<String> list = new ArrayList<>();
    list.add("a");
    list.add("b");
    list.add("c");
    list.add("d");
    request.setAttribute("list", list);
%>

<c:forEach items="${list}" var="tmp" varStatus="vs">
    ${vs.index}, ${tmp} <br/>
</c:forEach>

<hr/>
--%>
<h2>字典列表</h2>

<table cellpadding="20" cellspacing="0">
    <tr>
        <th>id</th>
        <th>类别</th>
        <th>名称</th>
        <th>值</th>
    </tr>
    <c:forEach items="${requestScope.sysdicts}" var="dict" varStatus="i" step="1">
        <tr>
            <td>${dict.id}</td>
            <td>${dict.code}</td>
            <td>${dict.name}</td>
            <td>${dict.value}</td>
            <td><a href="${pageContext.request.contextPath}/sysdict/showEidt.action?id=${dict.id}">编辑</a></td>
            <td><a href="${pageContext.request.contextPath}/sysdict/deleteById.action?id=${dict.id}">删除</a></td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="6">
            <a href="${pageContext.request.contextPath}/sysdict/showEidt.action">新增</a>
        </td>
    </tr>
</table>


</body>
</html>
